#继承父镜像
FROM naturecloud.io/library/ceph-web-basic:1.2
#维护者
MAINTAINER JohnnyDu

ENV CEPH_VERSION jewel

RUN mkdir /opt/webapp
ADD . /opt/webapp

RUN cd /opt/webapp/rados-java-master && \
    rm -fr /opt/tomcat/apache-tomcat-8.0.43/webapps/*  && \
    mvn clean install -Dmaven.test.skip=true && \
    cd ./target/ && \
    mv ./rados-1.0-SNAPSHOT ./rados && \
    rm -rf ./rados/WEB-INF/classes && \
    cp -rf ./classes ./rados/WEB-INF/ && \
    cp -rf /opt/webapp/rados-java-master/target/rados /opt/tomcat/apache-tomcat-8.0.43/webapps/

#监听8080端口
EXPOSE 8080

CMD ["/opt/tomcat/apache-tomcat-8.0.43/bin/catalina.sh", "run"]